Method and Apparatus for Syntax Redundancy Removal in Palette Coding

ABSTRACT

A method and apparatus for palette coding of a block of video data using a candidate prediction mode list with syntax redundancy removed are disclosed. In one embodiment, whether a redundant prediction mode exists in the candidate prediction mode list for the current samples of the current block is determined based on the candidate prediction mode list and the previous prediction mode associated with the previous samples. If the redundant prediction mode exists in the candidate prediction mode list, the redundant prediction mode is removed from the candidate prediction mode list to generate a reduced candidate prediction mode list. In another embodiment, whether a redundant predictor exists in a candidate predictor list for a current sample of the current block is determined based on a condition related to one or more predictors for the current sample of the current block.

CROSS REFERENCE TO RELATED APPLICATIONS

The present invention is a Continuation of pending U.S. National Phaseapplication Ser. No. 15/107,913, filed on Jun. 23, 2016, which claimspriority to U.S. Provisional Patent Application Ser. No. 61/921,156,filed on Dec. 27, 2013, U.S. Provisional Patent Application Ser. No.61/922,131, filed on Dec. 31, 2013, U.S. Provisional Patent ApplicationSer. No. 61/924,333, filed on Jan. 7, 2014, U.S. Provisional PatentApplication Ser. No. 61/924,758, filed on Jan. 8, 2014, U.S. ProvisionalPatent Application Ser. No. 61/932,832, filed on Jan. 29, 2014 and U.S.Provisional Patent Application Ser. No. 62/015,708, filed on Jun. 23,2014. The U.S. Provisional Patent Applications are hereby incorporatedby reference in their entireties.

TECHNICAL FIELD

The present invention relates to palette coding for video data. Inparticular, the present invention relates to techniques to improve theperformance of palette coding by removing syntax redundancy that mayexist in existing systems.

BACKGROUND

High Efficiency Video Coding (HEVC) is a new coding standard that hasbeen developed in recent years. In the High Efficiency Video Coding(HEVC) system, the fixed-size macroblock of H.264/AVC is replaced by aflexible block, named coding unit (CU). Pixels in the CU share the samecoding parameters to improve coding efficiency. A CU may begin with alargest CU (LCU), which is also referred as coded tree unit (CTU) inHEVC. In addition to the concept of coding unit, the concept ofprediction unit (PU) is also introduced in HEVC. Once the splitting ofCU hierarchical tree is done, each leaf CU is further split into one ormore prediction units (PUs) according to prediction type and PUpartition.

Along with the High Efficiency Video Coding (HEVC) standard development,the development of extensions of HEVC has also started. The HEVCextensions include range extensions (RExt) which target at non-4:2:0color formats, such as 4:2:2 and 4:4:4, and higher bit-depths video suchas 12, 14 and 16 bits per sample. One of the likely applicationsutilizing RExt is screen sharing, over wired- or wireless-connection.Due to specific characteristics of screen contents, coding tools havebeen developed and demonstrate significant gains in coding efficiency.Among them, the palette coding (a.k.a. major color based coding)techniques represent block of pixels using indices to the palette (majorcolors), and encode the palette and the indices by exploiting spatialredundancy. While the total number of possible color combinations ishuge, the number of colors in an area of picture is usually very limitedfor typical screen contents. Therefore, the palette coding becomes veryeffective for screen content materials.

During the early development of HEVC range extensions (RExt), severalproposals have been disclosed to address palette-based coding. Forexample, a palette prediction and sharing technique is disclosed inJCTVC-N0247 (Guo et al.,“RCE3: Results of Test 3.1 on Palette Mode forScreen Content Coding”, Joint Collaborative Team on Video Coding(JCT-VC) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11, 14thMeeting: Vienna, AT, 25 Jul.-2 Aug. 2013 Document: JCTVC-N0247). InJCTVC-N0247, the palette of each color component is constructed andtransmitted. The palette can be predicted (or shared) from its leftneighboring CU to reduce the bitrate. All pixels within the given blockare then coded using their palette indices. An example of encodingprocess according to JCTVC-N0247 is shown as follows.

-   -   1. Transmission of the palette: the palette size is first        transmitted followed by the palette elements.    -   2. Transmission of pixel values: the pixels in the CU are        encoded in a raster scan order. For each group of one or more        pixels, a flag for a run-based mode is first transmitted to        indicate whether the “run” mode or “copy above” mode is being        used.        -   2.1 “index run” mode: In the “index run” mode, a palette            index is first signaled followed by “palette_run” (e.g., M)            representing the run value. The run value indicates that a            total of M+1 samples are all coded using “index run” mode.            No further information needs to be transmitted for the            current position and the following M positions since they            have the same palette index as that signaled in the            bitstream. The palette index (e.g., i) may also be shared by            all three color components, which means that the            reconstructed pixel values are (Y, U, V)=(palette_(Y)[i],            palette_(U)[i], palette_(V)[i]) for the case of YUV color            space.        -   2.2 “copy above run” mode: In the “copy above run” mode, a            value “copy_run” (e.g., N) is transmitted to indicate that            for the following N positions (including the current one),            the palette index is the same as the corresponding palette            index in the row above.    -   3. Transmission of residue: the palette indices transmitted in        Stage 2 are converted back to pixel values and used as the        prediction. Residue information is transmitted using HEVC        residual coding and is added to the prediction for the        reconstruction.

In the above approach, other than the “index run” mode and the “copyabove run” mode, a current pixel may also be coded by “pixel” mode,where the pixel value is transmitted.

Another version of the palette coding technique has also been disclosedby Guo et al., in JCTVC-N0249 (Guo et al., “Non-RCE3: Modified PaletteMode for Screen Content Coding”, Joint Collaborative Team on VideoCoding (JCT-VC) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11, 14thMeeting: Vienna, AT, 25 Jul.-2 Aug. 2013 Document: JCTVC-N0249), whereeach element in the palette is a triplet representing a specificcombination of the three color components. The palette index is sharedby all color components to reduce overhead.

Yet another major color-base coding (palette coding) method is disclosedby Guo et al. in JCTVC-O0182 (Guo et al., “AHG8: Major-color-basedscreen content coding”, Joint Collaborative Team on Video Coding(JCT-VC) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11, 15thMeeting: Geneva, CH, 23 Oct.-1 Nov. 2013, Document: JCTVC-O0182).According to JCTVC-O0182, the palette of each component are constructedand transmitted. However, instead of predicting the entire palette fromthe left CU, individual entry in a palette can be predicted from theexact corresponding palette entry in the above CU or left CU.

According to JCTVC-O0182, a predictive coding method is applied on theindices for transmission of pixel values, where a pixel line can bepredicted by different modes. In specific, three kinds of line modes areused for a pixel line, i.e. horizontal mode, vertical mode and normalmode. In horizontal mode, all the pixels in the same line have the samevalue. If the value is the same as the first pixel of the above pixelline, only line mode signaling bits are transmitted. Otherwise, theindex value is also transmitted. In vertical mode, the current pixelline is the same with the above pixel line. Therefore, only line modesignaling bits are transmitted. In normal mode, pixels in a line arepredicted individually. For each pixel, the left or above neighboringpixel is used as predictor, and the prediction symbol is transmitted tothe decoder. Furthermore, pixels are classified into major color pixelsand escape pixels. For major color pixels, the decoder reconstructs thepixel values using the major color indices and palette. For escapepixels, the encoder will further send the pixel values.

It is desirable to develop methods for further improving the codingefficiency associated with the palette coding.

SUMMARY

A method and apparatus for palette coding of a block of video data usinga candidate prediction mode list with syntax redundancy removed aredisclosed. In one embodiment, whether a redundant prediction mode existsin the candidate prediction mode list for the current samples of thecurrent block is determined based on a combination of one or more of thecandidate prediction mode list, the previous prediction mode associatedwith the previous samples, position of the current sample. If theredundant prediction mode exists in the candidate prediction mode list,the redundant prediction mode is removed from the candidate predictionmode list to generate a reduced candidate prediction mode list, andpalette encoding or decoding is applied to the current samples of thecurrent block using the reduced candidate prediction mode list.

In one embodiment, the candidate prediction mode list consists of acopy-above-run mode, an index-run mode. The copy-above-run mode uses thecorresponding samples in an above row to predict the current samples inthe current block. The index-run mode encodes or decodes the currentsamples of the current block using a same first sample value. When theprevious prediction mode is equal to the copy-above-run mode, thecopy-above-run mode is redundant. The candidate prediction mode list mayfurther comprise a pixel mode to encode or decode an individual pixelsample value of an individual sample of the current block. When thecopy-above-run mode is used for the current samples of the currentblock, a run value corresponding to the number of the current samples issignaled in a bitstream or parsed from the bitstream. When the index-runmode is used for the current samples of the current block, the samesample value and a run value corresponding to a number of the currentsamples of the current block are signaled in a bitstream or parsed fromthe bitstream. The candidate prediction mode list further comprises acopy-above-N-row mode to use one or more corresponding first samples inabove R rows to predict one or more first samples of the current block.

In another embodiment, the system determines whether a redundantpredictor exists in the candidate predictor list for a current sample ofthe current block based on a condition related to the predictors for thecurrent sample of the current block. If the redundant predictor existsin the candidate predictor list, the redundant predictor is removed orreplaced to generate a modified candidate predictor list. Paletteencoding or decoding is then applied to the current sample of thecurrent block using the modified candidate predictor list.

The candidate predictor list may consist of a copy-above predictor touse a sample in an above row to predict the current sample, a copy-leftpredictor to use a left sample to predict the current sample, and one ormore other modes. If the copy-above predictor and the copy-leftpredictor are the same for the current sample, the copy-above predictoror the copy-left predictor is redundant. In this case, the copy-abovepredictor or the copy-left predictor is removed from the candidatepredictor list.

When a redundant predictor exists, the redundant predictor may also bereplaced by a replacement candidate predictor determined based on sampleposition of a selected candidate predictor or a last coded syntax. Forexample, if the sample position of the selected candidate predictor isoutside the current block, the selected candidate predictor is notplaced into the modified candidate predictor list. In another example,if the candidate predictor list consists of a copy-above predictor touse a sample in an above row to predict the current sample and the lastcoded syntax is the copy-above predictor, the last coded syntax is notplaced into the modified candidate predictor list. The system mayfurther determine whether a current prediction mode is placed into thecandidate prediction mode list depends on position of said one or morecurrent samples of the current block or coded syntax for the currentprediction mode. For example, the current prediction mode is not placedinto the candidate prediction mode list if reference pixels of thecurrent prediction mode are not available. In another example, a lastprediction mode corresponding to a last coded syntax is not placed intothe candidate prediction mode list. In yet another example, a predictionmode index corresponding to the current prediction mode is signaled in abitstream or parsed from the bitstream.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 illustrates an exemplary flowchart of a system for palette codingusing a candidate prediction mode list with the redundant predictionmode according to an embodiment of the present invention.

FIG. 2 illustrates an exemplary flowchart of a system for palette codingusing a candidate predictor list with the redundant predictor removed orreplaced according to an embodiment of the present invention.

DETAILED DESCRIPTION

In the present invention, various techniques to improve the performanceof palette coding are disclosed. In particular, efficient palette codingtechniques using a candidate prediction mode list or a candidatepredictor list with redundancy removed are disclosed.

Removal of Prediction Mode Signaling Bits Redundancy.

As mentioned before, in the run-based palette as described inJCTVC-N0247 and N0249, the color index is coded using “index-run” modeand “copy-above-run” mode. In the “index-run” mode, it checks whetherthe following color indices are the same as the current color index. Ifso, it signals the “index-run” mode and a color index value for thecurrent sample. It further determines the “run” length, i.e., the numberof consecutive same color indices including the current one. In the“copy-above-run” mode, it checks whether following color indices are thesame as corresponding color indices in the above row. If so, it signalsthe “copy-above-run” mode. Then it further determines the “run” length,i.e., the number of consecutive same color indices as the correspondingcolor indices in the above row including the current one. If theprevious coding pattern is “copy-above-run” mode with a run value equalto M, the next pattern should not be “copy-above-run” mode. If the nextpattern is also the “copy-above-run” mode with a run equal to N, the twopatterns would have been combined into a single “copy-above-run” modewith a run value equal to (M+N+1). Therefore, an embodiment according tothe present invention removes “copy-above-run” mode signaling if theprevious coding pattern is a “copy-above-run” mode. While the aboveexample eliminates the syntax redundancy by checking the case of twoconsecutive “copy-above-run” modes, the present invention may analyzethe previous decoded prediction modes and then change the signalingmethod according to the previous coded prediction modes.

A pseudo code corresponding to JCTVC-N0247 is shown as follow.

code palette_run_mode if (palette_run_mode == index_run_mode) { codepalette_idx } code palette_run

In the above pseudo code, syntax palette_run_mode corresponds to the“copy-above-run” mode or the “index-run” mode. If it is the “index-run”mode (i.e., palette_run_mode==index_run_mode), the palette index for thecurrent color index is transmitted (i.e., code palette_idx) followed byan associated run length (i.e., code palette_run). If it is not the“index-run” mode (i.e., “copy-above-run” mode being used), only the runlength is coded (i.e., code palette_run) since the leading color indexcan be determined from the above row. The “copy-above-run” mode are alsocalled “copy top run” mode, “copy above” mode or “copy top” mode. Thesenames are used interchangeably in this disclosure.

A pseudo code corresponding to an embodiment of the present invention isshown as follows.

if( last_coded_palette_run_mode == index_run_mode) { codepalette_run_mode if (palette_run_mode == index_run_mode) { codepalette_idx } code palette_run } else { code palette_idx codepalette_run }

As shown in the above pseudo code for the current embodiment, the pseudocode corresponding to JCTVC-N0247 is performed only when the previouscoding pattern is a “index run mode”, i.e., if(last_coded_palette_run_mode==index_run_mode)==True. In other words, thesyntax palette_run_mode will only be coded if the previous coded patternis not a “copy-above-run” mode so that no consecutive “copy-above-run”modes will occur. When the syntax palette_run_mode is not presented, thepalette_run_mode is inferred as index_run_mode (the index-run mode).

As mentioned before, the palette coding as disclosed in JCTVC-N0247,JCTVC-O0182 and JCTVC-B0249 support the “index run” mode, “copy top”mode, “horizontal” mode and “vertical” mode. In order to improve theperformance, additional palette index coding modes (i.e., predictionmodes) are disclosed according to the present invention. Furthermore,when the neighboring palette index value used to predict current paletteindex is not available, a default index value (e.g. zero), a derivedindex value based on the neighboring pixels, a default value (e.g.,zero), or a derived value based on the pixel value of the neighboringreconstructed pixels are used according to an embodiment of the presentinvention.

In another embodiment of the present invention, the relationship amongthe predictors is checked. If any syntax redundancy is determined, thesyntax redundancy is removed.

For example, if the current coding predictor is equal to one of theprevious coded predictor, it can be skipped. Table. 1 illustratesanother example according to an embodiment of the present inventioncompared to that of JCTVC-O0182. Signal bits in according to JCTVC-O0182for various predictors are shown in the second column. The embodiment ofthe present invention checks the relation between predictorscorresponding to color indexes of the above pixel (A) and the left pixel(L). Depending on whether the left color index (i.e., left predictor) isthe same as the above color index (i.e., above predictor), differentsignal bits are shown in the third and fourth columns in Table 1. Asshown in the fourth column, if the color index of the left pixel isequal to the color index of the above pixel, and the color index of thecurrent pixel is not equal to the above pixel, the signaling of thesecond bit can be skipped since there are no other cases to bedifferentiated. In other words, the current pixel is either predicted bythe above pixel (same as the left pixel) or not predicted by any of theabove and the left pixel. In the example illustrated in Table 1, thesignal bit for the “copy left” mode is skipped. However, signal bit “1”can be assigned to indicate “copy left” mode so that the signal bit for“copy top” is skipped. Alternatively, both the “copy top” and “copyleft” modes can be assigned the same signal bit, i.e., “1”.

TABLE 1 Signal Bits Prediction according to Signal Bits Signal Bits ModeJCTVC-O0183 if L != A if L == A copy top 1 1 1 copy left 01 01 (Removed)no prediction 00 00 0

An exemplary pseudo code to implement the signaling method of Table 1 isillustrated as follows.

code equal_to_above  if (L != A && equal_to_above = 0) codeequal_to_left else code normal_predictor

As shown in the above pseudo code, the first bit for the “copy top” modeis always coded (i.e., code equal_to_above). If the current pixel is thesame as the above pixel, no further bit will be signaled since “equal toabove=0” will be always false. Otherwise, the bit for the “copy left”mode (i.e., code equal_to_left) will be signaled if the left pixel isnot the same as the above pixel (i.e., “L !=A”==true). If the currentpixel is not the same as the left pixel, the “normal” mode (i.e. noprediction) will be used.

The exemplary signaling bits design shown in Table 1 can be extended toinclude “copy top-left” mode and “copy top-right” mode as shown in Table2.

TABLE 2 Signal Bits Signal Bits Prediction according to Signal Bits if L== A, and L != Mode JCTVC-O0183 if L != A AL && L!= AR copy top 1 1 1copy left 01 01 (Removed) No prediction 00 000 00 copy top-left N/A 0011011 copy top-right N/A 0010 010

An exemplary pseudo code to implement the signaling method of Table 2 isillustrated as follows.

code equal_to_above  if (L != A && equal_to_above = 0) codeequal_to_left  if(equal_to_left == 0 && equal_to_above == 0 && ( (AL !=L && AL != A) ∥ (AR != L && AR != A) code equal_to_AL_or_AR  if(equal_to_AL_or_AR == 1)  { if((AL != L && AL != A) &&(AR != L && AR !=A)) code equal_to AL else if(AL != L && AL != A) current pixel = AL elsecurrent pixel = AR  }  else  code normal_predictor

While the relationship among the predictors can be used for adaptivesignaling of coded bits, the adaptive signaling may also depends on theprevious decoded pixels. These previous decoded pixels can be analyzedto determine features or characteristics. Adaptive signaling can then beapplied according to the analyzed features or characteristics. Forexample, if the pixels in previous lines or columns show a strong edge,the signaling method can be modified according to the edge direction. Ifthe edge feature is used for adaptive signaling, various edge detectionmethods available in the literature can be used. The analysis can bebased on pixel values, color indexes, or prediction patterns.

The redundancy check can depends on the sample position. For examples,the redundancy check can be used to remove the “copy top”, “copytop-right” and “copy top-left” predictors for pixels in the first row ofthe CU since these predictors are outside the current block and notavailable. The redundancy check can also be used to remove the “copyleft”, “copy top- left” and “copy left-down” predictors for pixels inthe first column of the CU. This redundancy check can be applied tohorizontal line mode/vertical line mode/normal line mode in JCTVC-O0182.

New Prediction Direction and Syntax for Color Index Map Coding

Another aspect of the present invention addresses new predictiondirection and syntax for color index coding to improve the performanceof color index coding. In one embodiment, the additional palette indexcoding modes include:

“copy top-left” mode. In the “copy top-left” mode, a value “copy_run”(e.g., N) is transmitted or derived to indicate that the palette index(also called color index in this disclosure) is equal to the paletteindex of the top-left location for the following N positions (includingthe current one).

“copy top-right” mode. In the “copy top-right” mode, a value “copy_run”(e.g., N) is transmitted or derived to indicate that the palette indexis equal to the palette index of the top-right location for thefollowing N positions (including the current one).

“copy temporal” mode. In the “copy temporal” mode, a value “copy_run”(e.g., N) is transmitted or derived to indicate that the palette indexis equal to the palette index of the collocated location in the temporalreference picture for the following N positions (including the currentone).

“copy left” mode. In the “copy left” mode, a value “copy_run” (e.g., N)is transmitted or derived to indicate that the palette index is the sameas that at the same location in the left column for the following Npositions (including the current one). In one example, N is 1. Inanother example, the N can be the number of the remaining paletteindices that are not coded yet within the same line.

“copy prediction” mode. In the “copy prediction” mode, a value“copy_run” (e.g., N) is transmitted or derived to indicate that for thefollowing N positions (including the current one), the palette index isequal to the palette index of the palette predictor. The palettepredictor can be derived from the coded palette index. Furthermore, thecoded palette index may include multiple coded rows/columns. Forexample, the above N rows can be used, where N is an integer. Anotherexample is that the gradient may be propagated if the above rows areused to form a predictor row.

“copy above2line” mode. In “copy above2line” mode, a value “copy_run”(e.g., N) is transmitted or derived to indicate that for the following Npositions (including the current one), the palette index is equal to thepalette index at a location two lines (i.e. two CU rows) above thecurrent row.

According to the new copy modes described above, multiple copy modes areintroduced. For example, there are copy top, copy left, copy top-left,copy top-right, and copy above2line modes. For these copy modes, thecopy mode can be adaptively put into a candidate prediction mode listwhen a redundant prediction mode is removed. Decision regarding whichcopy mode can be placed into the list can depend on the sample positionand the coded syntaxes. For example, if the top, left, top-left,top-right or above2line samples is not available (e.g. outside of thecurrent block), the corresponding copy mode will not be placed into thecandidate prediction mode list. Furthermore, the copy mode of the lastcoded syntax will not be placed into the list. For example, if the lastcoded syntax is the copy above mode, then the copy above mode will notbe put into the list. After generating the copy mode list, a copy modeindex is signaled to indicate which copy mode in the list is used. Thecopy mode index can be coded using a truncated unary code. The copy modeindex can also be coded with context bins or equal probability bins.

If the run has a maximum value, the copy mode that can be placed intothe list will depend not only on the sample position and the previouscoded syntaxes, but also on the last coded run value. The copy mode ofthe last coded syntax with the run value smaller than maximum run valuewill not be placed into the list. The copy mode of the last coded syntaxwith the run equal to the maximum run value will be put into the list.

To further improve the prediction efficiency, a method to use adaptivecodeword based on the position of current pixel is disclosed. Forexample, if the pixel is in the first row, the codewords for “copyabove”, “copy above-left” and “copy above-right” are excluded. If thepixel is in the first column, the codewords for “copy left” and“copy-down-left” are excluded. This adaptive codeword method can beapplied in “normal line mode” as disclosed in JCTVC-O0182.

While the “copy above2line” mode is disclosed above, a similar, but moregeneral mode, named “copy above N row mode” is disclosed as follows. Thecopy above N row mode can replace the copy above mode and copyabove2line mode.

“copy above N row” mode. In “copy above N row” mode, a value “copy run”(e.g.,

N) and a value “above_row_index” (e.g., R) are transmitted or derived toindicate that for the following N positions (including the current one),the palette index is equal to the palette index at the location R+1lines above the current location.

The codeword of above_row_index can depend on the row location of thecurrent sample. For example, if the current sample is in the third row,the above_row_index cannot be larger than 1 (0 for 1 row above, 1 for 2rows above, 2 for 3 rows above, etc). In other words, the maximumabove_row_index is 1. The binary codeword of above_row_index can beadaptive changed according to the sample position. In another example,if the current sample is in the first row, the copy above N row mode isdisabled or not allowed. All modes in the first row are inferred as an“index-run” mode. In yet another example, if the current sample is inthe second row, the above_row_index is inferred as 0.

The codeword of above_row_index can also depend on the last coded mode.If the last coded mode is “copy above N row” mode and above_row_index isRprev, and the current prediction mode is also “copy above N row” mode,then the above_row_index of the current prediction mode cannot be Rprev.If two consecutive “copy above N row” modes with the same

Rprev occur, the two “copy above N row” modes with the same Rprev wouldbe combined into one with a new run value equal to the sum of twoindividual run values. If the above_row_index of current mode is Rcurand Rcur is larger than Rprev, the codeword of Rcur can be reduced by 1since Rcur cannot be the same as Rprev according to this embodiment. Forexample, if Rprev is 3 and Rcur is 5, the codeword for Rcur is reducedby 1 to become 4. The codeword for the modified Rcur (i.e., 4) issignaled to the decoder. The decoder can recover the original Rcur bycomparing the received codeword with Rprev. If the decoded Rcur valuecorresponding to the received codeword is equal to or larger than Rprev,the actual Rcur is increased by 1 from the decoded Rcur.

The codeword and binarization of above_row_index can depend on the lastcoded mode, the row index of current sample, and possible maximum numberof above_row_index. For example, the binarization method can use atruncated unary. The maximum bit-length may depend on the possiblemaximum number of above_row_index.

In another embodiment, in additional to the “index-run” mode, “copy top”mode, “horizontal” mode and “vertical” mode, additional palette indexcoding modes are disclosed to improve the performance as follows.

“copy above pixel” mode, “copy left pixel” mode, “copy above-left pixel”mode, “copy above-right pixel” mode and “copy left-down pixel” mode. Inthese new modes, a value “copy_run” (e.g., N) is transmitted or derivedto indicate that for the following N positions (including the currentone), the pixels values are equal to the reconstructed pixel values inthe corresponding positions (i.e., above pixel, left pixel, above-leftpixel, above-right pixel and left-down pixel respectively). Since thepixels values are directly copied, no escape code is required in thesenew modes.

Candidate Base Index Map Coding

Another aspect of the present invention addresses the candidate basedindex map coding. In one embodiment, a palette index candidate list isderived from the neighboring or coded palette index. For example, thecandidate list may include the palette indices from above, left,above-left and above-right (i.e., above_palette_index,left_palette_index, above_left_palette_index,above_right_palette_index). The redundancy check can be applied to thecandidate list to remove any redundant palette index. When a paletteindex is removed, the following palette index or indices can be movedforward. For the vacated candidate, a predefined palette index or apalette that is derived in certain predefined method can be used to fillthe vacated candidate. For example, if the above_palette_index,left_palette_index and above_right_palette_index are the same, theredundant palette index can be pruned (i.e., removed). After pruning,the corresponding candidate list becomes {above_palette_index,above_right_palette_index, above_palette_index, above_palette_index}.The left_palette_index and the above_right_palette_index are removed.The above_right_palette_index is moved to the second position. The restcandidates are filled with the above_palette_index.

Other methods to fill the vacated palette index candidate may also beused. For example, the vacated palette index candidate can be filled bythe palette index plus N and/or minus N, such as above_palette_index+1and/or above_palette_index−1. The candidate list after pruning andfilling with substitute candidates becomes {above_palette_index,above_right_palette_index, above_palette_index+1,above_palette_index−1}. The candidate index can be encoded to indicatewhich palette index is used. The “no_pred” symbol corresponding to “noprediction” can be inserted to the candidate list to form the finalcandidate list. The position of the “no_pred” can be fixed. For example,the “no_pred” can be inserted to the third position. Then the finalcandidate list of the previous example will become {above_palette_index,above_right_palette_index, no_pred, above_palette_index,above_palette_index}. The codewords for the candidate indices can befixed, or the maximum number of candidates in the list can be fixed. Forexample, if the maximum number of candidates in the list is limited to3, the final candidate list of the previous example after applying thelimit becomes {above_palette_index, above_right_palette_index, no_pred}.

The codeword for candidate list can be shown in Table 3. The codewordexample 1 in Table 3 corresponds to a candidate list limiting the numberof candidates to 3. The codeword example 2 in Table 3 corresponds to acandidate list limiting the number of candidates to 4.

TABLE 3 index Codeword 1 Codeword 2 0 1 1 1 00 00 2 01 011 3 010

The context modeling for the candidate index may be related to theprevious coded candidate index. For example, the context index of thefirst bin can be (0+previous coded index), the context index of thesecond bin can be (N+previous coded index), and the context index of thethird bin can be (2N+previous coded index), where N can be 2 or 3.Furthermore, some of the bins of the codeword or all bins of thecodeword can be coded in equal probability mode in context-adaptivebinary arithmetic coding (CABAC).

Variable Length Code for Major Color (Palette) Index Coding

When a pixel is not coded using a prediction mode, the index with fixedlength coding is transmitted according to JCTVC-O0182. However,according to an embodiment of the present invention, the colors in themajor color table can be properly ordered to improve coding efficiency.For example, the colors in the color table can be ordered according tooccurrence counts so that high occurrence colors will be located towardthe beginning of the color table while low occurrence colors are locatedtoward the end of the color table. Accordingly, a more efficient syntaxdesign can be constructed to exploit such property. For example, for amajor color table with 4 colors and the corresponding color indicesbeing 0, 1, 2 and 3, the color indices are arranged according tooccurrence counts so that color index 0 has the highest occurrence countand color index 3 has the lowest occurrence count. An example of fixedlength codes and variable length codes for this color table can bedesigned as shown in Table 4.

TABLE 4 Color index Fixed length variable length 0 00 0 1 01 10 2 10 1103 11 111

New Escape Pixel Value Signaling

In JCTVC-O0182, the escape pixel values are signaled after each line'sprediction pattern. According to an embodiment of the present invention,the escape pixel values are transmitted during transmitting the indexmap. If a pixel is an escape pixel, its pixel value can be transmittedafter the index signaling. Another embodiment, the escape pixel valuesare transmitted after entire index map coding (after entire codingunit's prediction pattern signaling).

To improve the parsing throughput of JCTVC-O0182, another embodiment ofthe present invention forces the escape index not to be predicted fromneighboring indexes. The escape index should be signaled by a normalline mode and no-pred mode. Alternatively, the escape pixel is signaledby a new flag.

Advanced Color Table and Index Map Syntax Parsing

In JCTVC-O0182, the escape pixel values are signaled after theprediction pattern for each line. To improve the system performance, anembodiment of the present invention signals the escape pixel valuesafter the prediction patterns for an entire coding unit are signaled(after signaling of the entire index map coding). This can improveparsing throughput since there is no need for frequency switchingbetween parsing the prediction patterns and the escape pixel values.Furthermore, color table signaling can be moved to the syntax positionafter the prediction pattern signaling for the entire lines. If thecolor index is variable length coded, before parsing the predictionpattern for the entire lines in the coding unit, the decoder can parsemajor color number first. Otherwise, the predicted color index signalingfor the normal (i.e., no prediction) pixels can be moved to the syntaxposition after the major color number signaling.

In one example, the decoder parses the prediction pattern for the entirecoding unit first. Then, the decoder parses the N escape pixel values,where N is derived from the previous parsing result.

In another example, the decoder parses the prediction pattern for theentire coding unit first. Then, the decoder parses color tables.Finally, the decoder parses the N escape pixel values, where N isderived from the previous parsing result.

In yet another example, the decoder parses the major color number first.Then, the decoder parses the prediction pattern for the entire codingunit. Then, the decoder parses color tables. Finally, the decoder parsesthe N escape pixel values, where N is derived from the previous parsingresult.

In JCTVC-N0247, N0249 and O0182, the index map is signaled after thecolor table signaling. An embodiment of the present invention signalsthe index first and uses the information by parsing the index map toencode other data.

The information determined by parsing the index map may correspond tothe occurrence information. The occurrence information can be used topredict the palette and reconstruct pixel value.

Modification of Index Map Coding

In the index map coding of JCTVC-N0247, an escape flag is coded for theescape pixel. If the escape flag is true, one escape code is coded.Otherwise, a flag is signaled to indicate that the prediction mode isequal to the “index-run” mode or the “copy above” mode. An example ofthe codeword is shown in Table 5.

While the escape syntax is coded in the shorted codeword (i.e., 1 bit),however, the probability of the escape syntax is not that high.Accordingly, an embodiment of the present invention lowers the priorityof “escape” syntax. Two examples of codewords for the “escape” syntaxwith lowered priority are shown in Table 5. In both examples, thecodeword for the “escape” syntax is increased to 2 bits. In example 1,the “index-run” mode has the shortest code and in example, the “copyabove” mode has the shortest code.

If context based coding is used, the context formation may use equalprobability bins. In another example, the context formation of the binthat indicates whether the current mode is an “escape” mode (e.g. thefirst bin of JCTVC-N0247, the second bin in example 1 and example 2 inTable 5) can depend on the previous prediction mode or the palette size.For example, the context formation may depend on whether the last codedprediction mode is an “escape” mode. If the last coded prediction modeis the “escape” mode, the context coding uses one context and if thelast coded prediction mode is not the “escape” mode, the context codinguses another context. In another example, if the palette size is equalto the maximum palette size, the context coding uses one context and ifthe palette size is not equal to the maximum palette size, the contextcoding uses another context.

TABLE 5 Signal Bits Current Current Prediction according to embodiment:embodiment: Mode JCTVC-N0247 example 1 example 2 Escape 1 00 00 IndexRun 00 1 01 Copy above 01 01 1

FIG. 1 illustrates an exemplary flowchart of a system for palette codingusing a candidate prediction mode list with the redundant predictionmode according to an embodiment of the present invention. The systemreceives input data associated with a current block as shown in step110. The input data corresponds to pixel data or color indices of thecurrent block to be coded at an encoder side or corresponds to codeddata or coded color indices of the current block to be decoded at thedecoder side. The input data may be retrieved from memory (e.g.,computer memory, buffer (RAM or DRAM) or other media) or from aprocessor. A previous prediction mode associated with one or moreprevious samples is determined as shown in step 120. Whether a redundantprediction mode exists in a candidate prediction mode list for one ormore current samples of the current block is determined based on theprevious prediction mode and the candidate prediction mode list as shownin step 130. The test regarding whether the redundant prediction modeexists in the candidate prediction mode list is performed in step 140.If the result is “yes”, steps 150 and 160 are performed. If the resultis “no”, steps 150 and 160 are bypassed. In step 150, the redundantprediction mode is removed from the candidate prediction mode list togenerate a reduced candidate prediction mode list. In step 160, thepalette encoding or decoding is applied to the current samples of thecurrent block using the reduced candidate prediction mode list.

FIG. 2 illustrates an exemplary flowchart of a system for palette codingusing a candidate predictor list with the redundant predictor removed orreplaced according to an embodiment of the present invention. The systemreceives input data associated with a current block as shown in step210. Whether a redundant predictor exists in a candidate predictor listfor a current sample of the current block is determined based on acondition related to one or more predictors for the current sample ofthe current block in step 220. The test regarding whether the redundantpredictor exists in the candidate predictor list is performed in step230. If the result is “yes”, steps 240 and 250 are performed. If theresult is “no”, steps 240 and 250 are bypassed. In step 240, theredundant predictor is removed or replaced to generate a modifiedcandidate predictor list. In step 250, the palette encoding or decodingis applied to the current sample of the current block using the modifiedcandidate predictor list.

The flowcharts shown are intended to illustrate an example of palettecoding according to the present invention. A person skilled in the artmay modify each step, re-arranges the steps, split a step, or combinesteps to practice the present invention without departing from thespirit of the present invention. In the disclosure, specific syntax andsemantics have been used to illustrate examples to implement embodimentsof the present invention. A skilled person may practice the presentinvention by substituting the syntax and semantics with equivalentsyntax and semantics without departing from the spirit of the presentinvention.

The above description is presented to enable a person of ordinary skillin the art to practice the present invention as provided in the contextof a particular application and its requirement. Various modificationsto the described embodiments will be apparent to those with skill in theart, and the general principles defined herein may be applied to otherembodiments. Therefore, the present invention is not intended to belimited to the particular embodiments shown and described, but is to beaccorded the widest scope consistent with the principles and novelfeatures herein disclosed. In the above detailed description, variousspecific details are illustrated in order to provide a thoroughunderstanding of the present invention. Nevertheless, it will beunderstood by those skilled in the art that the present invention may bepracticed.

Embodiment of the present invention as described above may beimplemented in various hardware, software codes, or a combination ofboth. For example, an embodiment of the present invention can be acircuit integrated into a video compression chip or program codeintegrated into video compression software to perform the processingdescribed herein. An embodiment of the present invention may also beprogram code to be executed on a Digital Signal Processor (DSP) toperform the processing described herein. The invention may also involvea number of functions to be performed by a computer processor, a digitalsignal processor, a microprocessor, or field programmable gate array(FPGA). These processors can be configured to perform particular tasksaccording to the invention, by executing machine-readable software codeor firmware code that defines the particular methods embodied by theinvention. The software code or firmware code may be developed indifferent programming languages and different formats or styles. Thesoftware code may also be compiled for different target platforms.However, different code formats, styles and languages of software codesand other means of configuring code to perform the tasks in accordancewith the invention will not depart from the spirit and scope of theinvention.

The invention may be embodied in other specific forms without departingfrom its spirit or essential characteristics. The described examples areto be considered in all respects only as illustrative and notrestrictive. The scope of the invention is therefore, indicated by theappended claims rather than by the foregoing description. All changeswhich come within the meaning and range of equivalency of the claims areto be embraced within their scope.

1. A method of coding a block of video data using palette coding in avideo coding system, the method comprising: receiving input dataassociated with a current block; determining at least one first palettesyntax; and if at least one sample coded as an escape pixel exists inthe current block, applying escape-sample encoding or decoding to the atleast one sample coded as an escape pixel to generate at least onesecond palette syntax of the at least one sample coded as an escapepixel after the at least one first palette syntax.
 2. The method ofclaim 1, wherein the at least one first palette syntax comprises atleast one of the syntaxes of palette table coding, palette escape valuepresent flag, palette transpose flag, palette run mode, palette run, andpalette index.
 3. The method of claim 1, wherein the at least one secondpalette syntax comprises an escape value of the at least one samplecoded as an escape pixel.
 4. The method of claim 1, wherein the at leastone second palette syntax comprises an escape value of at least onecolor component of the at least one sample coded as an escape pixel. 5.The method of claim 1, wherein the at least one second palette syntax issignaled at the end of the syntax coding of the current CU, or afterindex signaling of the current CU or after index map coding of thecurrent CU or after prediction pattern signaling of the current CU. 6.The method of claim 1, wherein the at least one first palette syntaxassociates with a palette index map.
 7. The method of claim 1, whereinwhen the number of the at least one first palette syntax is more thanone, the at least one second palette syntax is not generated before anyof the first palette syntaxes.
 8. An apparatus of coding a block ofvideo data using palette coding in a video coding system, the apparatuscomprising one or more electronic circuits configured to: receivinginput data associated with a current block; determining at least onefirst palette syntax; and if at least one sample coded as an escapepixel exists in the current block, applying escape-sample encoding ordecoding to the at least one sample coded as an escape pixel to generateat least one second palette syntax of the at least one sample coded asan escape pixel after the at least one first palette syntax.
 9. Theapparatus of claim 8, wherein the at least one first palette syntaxcomprises at least one of the syntaxes of palette table coding, paletteescape value present flag, palette transpose flag, palette run mode,palette run, and palette index.
 10. The apparatus of claim 8, whereinthe at least one second palette syntax comprises an escape value of theat least one sample coded as an escape pixel.
 11. The apparatus of claim8, wherein the at least one second palette syntax comprises an escapevalue of at least one color component of the at least one sample codedas an escape pixel.
 12. The apparatus of claim 8, wherein the at leastone second palette syntax is signaled at the end of the syntax coding ofthe current CU, or after index signaling of the current CU or afterindex map coding of the current CU or after prediction pattern signalingof the current CU.
 13. The apparatus of claim 8, wherein the at leastone first palette syntax associates with a palette index map.
 14. Theapparatus of claim 8, wherein when the number of the at least one firstpalette syntax is more than one, the at least one second palette syntaxis not generated before any of the first palette syntaxes.